1. Field of the Invention
This invention relates to a method for producing a bump mapping effect for a three dimensional (3D) object of the computer graphic, and more particularly, the invention relates to method for producing a bump mapping effect for a 3D object of the computer graphic by using the embossing function.
2. Description of Related Art
In the field of computer graphic technology, the ability to generate a textured outer appearance of a 3D object for the computer graphics has been a very important issue. Currently, the technology for bump mapping is often used to increase the detail of the surface of the 3D object. The surface model for the 3D object of the graphic usually is composed of a number of polygons, for example, so as to produce the vein by the uneven bright and dark level. The 3D object can be viewed to have a wrinkled or uneven surface. However, this technology requires the computation of each point on the surface of the 3D object, in order to obtain the information of the normal vector in variation. For the product with the function for processing the 3D computer graphics, the technique is complicated and requires much processing time.
Alternatively, there is another method of applying the technology used for processing the 2D image in the process of the 3D computer graphic, such as, the emboss function technology. The technology of the embossing function is applied by changing the texture sample and wrapping it on the surface of the 3D object. Even though it is not directly applied on the model of the 3D object, it still can achieve the same visual effect. As to this property, the special interest group on computer graphics (SIGGRAPH) has been proposed in 1998 to diffuse the bump mapping technology. This technology is applied by wrapping the texture sample onto the surface of a 3D object. This is the first image. The surface of the object is composed of a number of polygons for simulation in display. Then, the normal vector, the tangent vector, and the binormal vector for each end point of the polygon are computed. After that, the foregoing three vectors are used to produce a rotation matrix, and the light source vector is rotated to the tangent space via the rotation matrix. Then, the vector components on the X-Y plane of the light source vector after being rotated are treated as the shift coordinates with respect to the end points, and then the end points are shifted. The shift coordinate for the point within the polygon is computed by an interpolation method, according to each of the end points. In this manner, the shift coordinate for all of the points can be computed a new polygon is then produced. All of the polygons are shifted by repeating the foregoing processing step, and then a second image is produced. Next, the image value of the second image is subtracted by the image value of the first image, and thus an image with the embossing effect is obtained.
However, the foregoing conventional method has the following disadvantages:                (1) It is easy to produce the discontinuous surface texture. In regard to the foregoing method, the tangent vector for each of the end points is used to determine the shift coordinate. If the object has a curved or a steep surface, the relative variation for the tangent vector is very large, and this will cause the phenomenon of a discontinuous or broken surface when the embossed image from the computed results is wrapped onto the surface of the 3D object.        (2) It is complicated. In the foregoing method, each point needs to be computed to obtain the respective shift coordinate. The computation is tedious and time-consuming.        